﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Weazel.Willows.Model
{
	public partial class SignalFlowGraph
	{
		public void Refine(RefinedModel.Model model, RefinedModel.Datapath datapath)
		{
			RefinedModel.SignalFlowGraph refinedSignalFlowGraph =
				new Weazel.Willows.RefinedModel.SignalFlowGraph(datapath, this, LocalName);

			foreach (Weazel.Gezel.Model.Expression expression in Expressions)
				refinedSignalFlowGraph.Expressions.Add(expression);

			datapath.SignalFlowGraphs.Add(LocalName, refinedSignalFlowGraph);
		}
	}
}
